package peer.servertcp;

import peer.tools.ByteIntSwitch;

public class TunnelCloseMessageTCP {
	byte[] data;
	int tunnelId;
	short messageType=MessageTCP.type_CloseMessage;
	TunnelCloseMessageTCP(int tunnelId){
		data=new byte[6];
		ByteIntSwitch.toByteArray(tunnelId, data, 0);
	}
	
	TunnelCloseMessageTCP(byte[] rData){
		tunnelId=ByteIntSwitch.toInt(rData, 0);
	}
	
	int getTunnelId(){
		return tunnelId;
	}
	
	public byte[] getData(){
		return data;
	}
	
	public int getLength(){
		return data.length;
	}
	
	public short getMessageType(){
		return messageType;
	}
}
